package cn.edu.scnu.springbootcinema.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serial;
import java.io.Serializable;
import java.sql.Date;

@Data
@TableName("movies")
public class Movie implements Serializable {
    @Serial
    private static final long serialVersionUID = 2L;
    @TableId(type = IdType.AUTO)
    private Integer id;
    private String title;
    private String type;
    private String region;
    private String language;
    private String director;
    private String scriptwriter;
    private int viewCount;
    private float rating;
    private String coverUrl;
    private String description;
    private int duration;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @TableField("release_date")
    private Date releaseDate;
    private String videoUrl;
    private boolean isVip;
}